<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="../../../js/jquery.js"></script>
<script type="text/javascript" src="../../../js/jquery-ui-personalized.min.js"></script>
<script type="text/javascript" src="../js/buildingWork.js"></script>

<link type="text/css" href="../../../style/theme/ui.all.css" rel="stylesheet" />
<title>公告列表</title>
</head>
<body>
	<h1>${dormSupervisor.building.name }的公告列表</h1>
	<c:choose>
		<c:when test="${!empty bulletins.list}">
			<table class="bulletins" border="1px">
				<thead>
					<tr>
						<td>ID</td><td>标题</td><td>内容</td><td colspan="2">发布人</td>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${bulletins.list}" var="bulletin">
						<tr class="contents">
							<td>${bulletin.id }</td>
							<td>${bulletin.title }</td>
							<td>${bulletin.content}</td>
							<td>${bulletin.dormSupervisor.account.name }</td>
							<td>
								<button name="view" value="${bulletin.id }">查看具体内容</button>
								<button name="delete" value="${bulletin.id }">删除</button>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="messageDialog"><p></p></div>
		</c:when>
		<c:otherwise>
			<p>列表为空</p>
		</c:otherwise>
	</c:choose>
	
</body>
</html>